﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;
using System.Security.Cryptography;

namespace JuridicoWeb.Utils
{
    /// <summary>
    /// Summary description for Application
    /// </summary>
    public class Application
    {
        public Application()
        {
        }

        /// <summary>
        /// Retorna uma senha criptografada utilizado o modelo Md5 para segurança
        /// </summary>
        /// <param name="strChange"></param>
        /// <returns></returns>
        public static string Md5AddSecret(string strChange)
        {
            byte[] pass = Encoding.UTF8.GetBytes(strChange);
            MD5 md5 = new MD5CryptoServiceProvider();
            string strPassword = Encoding.UTF8.GetString(md5.ComputeHash(pass));
            return strPassword;
        }
    }
}